package com.gtw.modules.entity;

import com.gtw.dto.TbBargainDto;

import java.io.Serializable;
import java.util.Date;

/**
 * 砍价记录表
 */
public class TbBargain implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Integer id;

    /**
     * 商品ID
     */
    private Integer commodityid;

    /**
     * 发起砍价人id
     */
    private Integer userid;

    /**
     * 创建时间
     */
    private Date createdate;

    /**
     * 砍价金额
     */
    private Integer price;

    /**
     * 活动ID
     */
    private Integer activityid;

    /**
     * 是否是帮砍
     */
    private Integer isbargain;
    /**
     * 帮砍的用户ID
     */
    private Integer buserid;

    /**
     * 是否结束
     */
    private boolean isend;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCommodityid() {
        return commodityid;
    }

    public void setCommodityid(Integer commodityid) {
        this.commodityid = commodityid;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public Date getCreatedate() {
        return createdate;
    }

    public void setCreatedate(Date createdate) {
        this.createdate = createdate;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getActivityid() {
        return activityid;
    }

    public void setActivityid(Integer activityid) {
        this.activityid = activityid;
    }

    public Integer getBuserid() {
        return buserid;
    }

    public void setBuserid(Integer buserid) {
        this.buserid = buserid;
    }

    public Integer getIsbargain() {
        return isbargain;
    }

    public void setIsbargain(Integer isbargain) {
        this.isbargain = isbargain;
    }

    public boolean getIsend() {
        return isend;
    }

    public void setIsend(boolean isend) {
        this.isend = isend;
    }

    public TbBargainDto toDto(){
        TbBargainDto tbbargaindto=new TbBargainDto();
        tbbargaindto.setCreatedate(this.getCreatedate());
        tbbargaindto.setCommodityid(this.getCommodityid());
        tbbargaindto.setIsbargain(this.getIsbargain());
        tbbargaindto.setBuserid(this.getBuserid());
        tbbargaindto.setId(this.getId());
        tbbargaindto.setPrice(this.getPrice());
        tbbargaindto.setIsend(this.getIsend());
        tbbargaindto.setActivityid(this.getActivityid());
        return tbbargaindto;
    }
}